package
{
	import fl.containers.ScrollPane;
	
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	
	import icbc.app.AppGlobal;
	import icbc.app.control.Alert;
	import icbc.app.event.AppEvent;
	import icbc.nav.view.MainView;
	
	[SWF(width='800',height='645', backgroundColor='#ffffff', frameRate='60')]
	public class icbcnav extends Sprite
	{
		public function icbcnav()
		{
			if(stage!=null)
			{
				stage.align = StageAlign.TOP_LEFT;
				stage.scaleMode = StageScaleMode.NO_SCALE;
				stage.frameRate = 60;
			}
			init();
		}
		
		private function init():void
		{
			var global:AppGlobal = new AppGlobal();
			global.addEventListener(AppEvent.GLOBAL_READY, appGlobalReady);
			global.init(stage);
		}

		private function appGlobalReady(evt:AppEvent):void
		{
			var global:AppGlobal = evt.target as AppGlobal;
			global.removeEventListener(AppEvent.GLOBAL_READY, appGlobalReady);

			addChild(new MainView());
		}
	}
}